package com.example.orderminiappapi.service.Impl;

import com.example.orderminiappapi.bean.Search;
import com.example.orderminiappapi.bean.User;
import com.example.orderminiappapi.dao.SearchDao;
import com.example.orderminiappapi.dao.ShopDao;
import com.example.orderminiappapi.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SearchServiceImpl implements SearchService {

    @Autowired
    private SearchDao searchDao;

    @Override
    public List<Search> getHistorySearchList(User user) {
        return searchDao.getHistorySearchList(user);
    }

    @Override
    public Search getIfHasSearched(Search search) {
        return searchDao.getIfHasSearched(search);
    }

    @Override
    public int refreshSearchItem(Search search) {
        return searchDao.refreshSearchItem(search);
    }

    @Override
    public int addSearchItem(Search search) {
        return searchDao.addSearchItem(search);
    }
}
